package com.runningboy.springboot_jms.queue;

import org.springframework.jms.annotation.JmsListener;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description: 消费者
 * @Author Runningboy
 * @Date 2020/7/25 21:05
 * @Version 1.0
 */
@RestController
public class ConsumerReadMessageController {

    @JmsListener(destination = "activeMq-queue")
    public void readActiveQueue(String message){
        System.out.println("收到队列消息："+message);
    }

    @JmsListener(destination = "activeMq-topic")
    public void readActiveTopic(String message){
        System.out.println("收到主题消息："+message);
    }
}
